package com.chengcang.api.modules.busi.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(value = "订单保存DTO")
public class BusiOrderRequestDTO {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "甲方ID")
    private Long paId;

    @ApiModelProperty(value = "甲方NAME")
    private String paName;

    @ApiModelProperty(value = "订单编号")
    private String orderNo;

    @ApiModelProperty(value = "订单状态,0:待付款; 1:待发货; 2:已发货; 3:已完成; 4:已关闭")
    private Integer status;

    @ApiModelProperty(value = "订单金额")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "不含增值税金额")
    private BigDecimal noVatPrice;

    @ApiModelProperty(value = "增值税")
    private BigDecimal vat;

    @ApiModelProperty(value = "合同总价")
    private BigDecimal contractTotalPrice;

    @ApiModelProperty(value = "卖家收款金额")
    private BigDecimal sellerReceivePrice;

    @ApiModelProperty(value = "平台代收税费")
    private BigDecimal platformTakeTaxPrice;

    @ApiModelProperty(value = "订单类型")
    private Integer type;

    @ApiModelProperty(value = "需求方ID")
    private Long demandId;

    @ApiModelProperty(value = "需求方NAME")
    private String demandName;

    @ApiModelProperty(value = "供应方ID")
    private Long supplyId;

    @ApiModelProperty(value = "供应方NAME")
    private String supplyName;

    @ApiModelProperty(value = "收货地址外键")
    private Long addressId;

    @ApiModelProperty(value = "需求货品外键")
    private Long productId;

    @ApiModelProperty(value = "发票抬头外键")
    private Long invoiceHeadId;

    private String productUnit;

    private String productUnitName;


    //--------------------------入参必须值--------------------------

    @NotNull(message = "供应数量不能为空")
    @ApiModelProperty(value = "供应数量")
    private BigDecimal supplyNum;

    @NotNull(message = "需求单号不能为空")
    @ApiModelProperty(value = "需求编号")
    private String demandNo;

    //--------------------------FIXED--------------------------
    @ApiModelProperty(value = "客户外键")
    private Long tenantId;

    @ApiModelProperty(value = "创建人员")
    private Long creator;

    @ApiModelProperty(value = "更新人员")
    private Long updater;

    @ApiModelProperty(value = "创建时间")
    private Date createDate;

    @ApiModelProperty(value = "更新时间")
    private Date updateDate;

    @ApiModelProperty(value = "0 有效 1 无效")
    private Integer deleted;

    @ApiModelProperty(value = "是否默认 0 是 1否")
    private Integer defaulted;
}
